import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
import HomeView from "../views/HomeView.vue";

import UserLogin from "@/Pages/user/userLogin.vue";
import HomePage from "@/Pages/HomePage.vue";
import UserRegister from "@/Pages/user/userRegister.vue";
import UserManger from "@/Pages/admin/userManger.vue";

const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    name: "home",
    component: HomePage,
  },
  {
    path: "/user/login",
    name: "login",
    component: UserLogin,
  },
  {
    path: "/user/register",
    name: "register",
    component: UserRegister,
  },
  {
    path: "/admin/userManger",
    name: "userManger",
    component: UserManger,
  },
];

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
});

export default router;
